3.171 \(\int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx\)

Optimal. Leaf size=68 \[ \frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+3 a b^2 x \]

[Out]

3*a*b^2*x-3*a^2*b*arctanh(cos(f*x+e))/f+b*(a^2-b^2)*cos(f*x+e)/f-a^2*cot(f*x+e)*(a+b*sin(f*x+e))/f

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2792, 3023, 2735, 3770} \[ \frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+3 a b^2 x \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^2*(a + b*Sin[e + f*x])^3,x]

[Out]

3*a*b^2*x - (3*a^2*b*ArcTanh[Cos[e + f*x]])/f + (b*(a^2 - b^2)*Cos[e + f*x])/f - (a^2*Cot[e + f*x]*(a + b*Sin[
e + f*x]))/f

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2792

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -S
imp[((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1))/(
d*f*(n + 1)*(c^2 - d^2)), x] + Dist[1/(d*(n + 1)*(c^2 - d^2)), Int[(a + b*Sin[e + f*x])^(m - 3)*(c + d*Sin[e +
 f*x])^(n + 1)*Simp[b*(m - 2)*(b*c - a*d)^2 + a*d*(n + 1)*(c*(a^2 + b^2) - 2*a*b*d) + (b*(n + 1)*(a*b*c^2 + c*
d*(a^2 + b^2) - 3*a*b*d^2) - a*(n + 2)*(b*c - a*d)^2)*Sin[e + f*x] + b*(b^2*(c^2 - d^2) - m*(b*c - a*d)^2 + d*
n*(2*a*b*c - d*(a^2 + b^2)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] &
& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 2] && LtQ[n, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx &=-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\int \csc (e+f x) \left (3 a^2 b+3 a b^2 \sin (e+f x)-b \left (a^2-b^2\right ) \sin ^2(e+f x)\right ) \, dx\\ &=\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\int \csc (e+f x) \left (3 a^2 b+3 a b^2 \sin (e+f x)\right ) \, dx\\ &=3 a b^2 x+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\left (3 a^2 b\right ) \int \csc (e+f x) \, dx\\ &=3 a b^2 x-\frac {3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.54, size = 87, normalized size = 1.28 \[ \frac {a^3 \tan \left (\frac {1}{2} (e+f x)\right )+a^3 \left (-\cot \left (\frac {1}{2} (e+f x)\right )\right )+6 a b \left (a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+b (e+f x)\right )-2 b^3 \cos (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^2*(a + b*Sin[e + f*x])^3,x]

[Out]

(-2*b^3*Cos[e + f*x] - a^3*Cot[(e + f*x)/2] + 6*a*b*(b*(e + f*x) - a*Log[Cos[(e + f*x)/2]] + a*Log[Sin[(e + f*
x)/2]]) + a^3*Tan[(e + f*x)/2])/(2*f)

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 99, normalized size = 1.46 \[ -\frac {3 \, a^{2} b \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, a^{2} b \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a^{3} \cos \left (f x + e\right ) - 2 \, {\left (3 \, a b^{2} f x - b^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/2*(3*a^2*b*log(1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 3*a^2*b*log(-1/2*cos(f*x + e) + 1/2)*sin(f*x + e) + 2
*a^3*cos(f*x + e) - 2*(3*a*b^2*f*x - b^3*cos(f*x + e))*sin(f*x + e))/(f*sin(f*x + e))

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sin(f*x+e))^3,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)2/f*(tan((f*x+exp(1))/2)*a^3/4+(-2*tan((f*x+exp(1))/2)^3*b*a^2-tan((f*x+exp(1))/2)^2*a^3-4*tan((f*x+exp(1)
)/2)*b^3-2*tan((f*x+exp(1))/2)*b*a^2-a^3)*1/4/(tan((f*x+exp(1))/2)^3+tan((f*x+exp(1))/2))+3*b*a^2/2*ln(abs(tan
((f*x+exp(1))/2)))+6*b^2*a/2*(f*x+exp(1))/2)

________________________________________________________________________________________

maple [A]  time = 0.27, size = 72, normalized size = 1.06 \[ 3 a \,b^{2} x -\frac {a^{3} \cot \left (f x +e \right )}{f}-\frac {b^{3} \cos \left (f x +e \right )}{f}+\frac {3 a^{2} b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{f}+\frac {3 a \,b^{2} e}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^2*(a+b*sin(f*x+e))^3,x)

[Out]

3*a*b^2*x-1/f*a^3*cot(f*x+e)-1/f*b^3*cos(f*x+e)+3/f*a^2*b*ln(csc(f*x+e)-cot(f*x+e))+3/f*a*b^2*e

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 68, normalized size = 1.00 \[ \frac {6 \, {\left (f x + e\right )} a b^{2} - 3 \, a^{2} b {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, b^{3} \cos \left (f x + e\right ) - \frac {2 \, a^{3}}{\tan \left (f x + e\right )}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/2*(6*(f*x + e)*a*b^2 - 3*a^2*b*(log(cos(f*x + e) + 1) - log(cos(f*x + e) - 1)) - 2*b^3*cos(f*x + e) - 2*a^3/
tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 6.72, size = 194, normalized size = 2.85 \[ \frac {a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,f}-\frac {a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a^3+4\,b^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}+\frac {6\,a\,b^2\,\mathrm {atan}\left (\frac {36\,a^2\,b^4}{36\,a^3\,b^3-36\,a^2\,b^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}+\frac {36\,a^3\,b^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{36\,a^3\,b^3-36\,a^2\,b^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f}+\frac {3\,a^2\,b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(e + f*x))^3/sin(e + f*x)^2,x)

[Out]

(a^3*tan(e/2 + (f*x)/2))/(2*f) - (a^3*tan(e/2 + (f*x)/2)^2 + a^3 + 4*b^3*tan(e/2 + (f*x)/2))/(f*(2*tan(e/2 + (
f*x)/2) + 2*tan(e/2 + (f*x)/2)^3)) + (6*a*b^2*atan((36*a^2*b^4)/(36*a^3*b^3 - 36*a^2*b^4*tan(e/2 + (f*x)/2)) +
 (36*a^3*b^3*tan(e/2 + (f*x)/2))/(36*a^3*b^3 - 36*a^2*b^4*tan(e/2 + (f*x)/2))))/f + (3*a^2*b*log(tan(e/2 + (f*
x)/2)))/f

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (e + f x \right )}\right )^{3} \csc ^{2}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**2*(a+b*sin(f*x+e))**3,x)

[Out]

Integral((a + b*sin(e + f*x))**3*csc(e + f*x)**2, x)

________________________________________________________________________________________